package com.itheima.tlias84.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;

import java.time.LocalDateTime;

/**
 * @JosonIgnore 加在属性上springboot 对象转json的时候自动忽略掉该值
 * @JosonIgnoreProperties加在类上,指定多个需要忽略掉的json的属性,值就填属性名就行
 * @JsonInclude根据条件决定是否转json
 */
@Data
//@JsonIgnoreProperties({"id","updateTime"})
@JsonInclude(JsonInclude.Include.NON_NULL)
public class  SelectAllDeptDTO {
    private Integer id;
    private String name;
//    @JsonIgnore
    @JsonFormat(pattern = "yyyy年MM月dd日 HH:mm:ss")
    private LocalDateTime updateTime;
}
